<template>
  <div class="detail_comment" :style="'padding:'+data.padding.top/2+'px 0 '+data.padding.bottom/2+'px 0'">
    <div class="container" :style="'background:'+data.color.bg">
      <div class="label van-hairline--bottom">
        <p class="evaluate" :style="'color:'+data.color.title">
          评价
          <i>(10)</i>
        </p>
        <div class="flex align-center">
          <p class="toDetail" :style="'color:'+data.color.more">查看更多</p>
          <i class="iconfont-m- el-icon-arrow-right"></i>
        </div>
      </div>
      <div class="body">
        <ul class="all-comment">
          <li class="com_item van-hairline--bottom">
            <div class="head">
              <div class="userinfo" :style="'color:'+data.color.username">
                <p class="avart">
                  <img src="@/assets/images/nologin.jpg" draggable="false" />
                </p>
                <span class="name">Davy</span>
                <span class="time"></span>
              </div>
              <div class="star" :style="'color:'+ data.color.start">
                <i class="iconfont-m-  el-icon-star-on"></i>
                <i class="iconfont-m-  el-icon-star-on"></i>
                <i class="iconfont-m-  el-icon-star-on"></i>
                <i class="iconfont-m-  el-icon-star-on"></i>
                <i class="iconfont-m-  el-icon-star-on"></i>
              </div>
            </div>
            <div class="content" :style="'color:'+ data.color.evaluate">
              优质.丝光棉:面料光滑,手感顺化,弹力也很好，大小很合适,柔软如绢丝.
            </div>
            <p class="spec" :style="'color:'+ data.color.sku">规格：黑色/L</p>
            <ul class="comment-imgs">
              <li class="img-box">
                <img
                  mode="scaleToFill"
                  src="@/assets/images/default_goods1.jpg"
                  alt=""
                  class="img"
                  draggable="false"
                />
              </li>
              <li class="img-box">
                <img
                  mode="scaleToFill"
                  src="@/assets/images/default_goods2.jpg"
                  alt=""
                  class="img"
                  draggable="false"
                />
              </li>
              <li class="img-box">
                <img
                  mode="scaleToFill"
                  src="@/assets/images/default_goods3.jpg"
                  alt=""
                  class="img"
                  draggable="false"
                />
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      data: {
        type: Object,
        default: {

        }
      }
    },
    }

</script>

<style lang="scss" scoped>
.detail_comment {
  width: 100%;
  p{
    margin: 0;
  }
  ul{
    margin: 0;
  }
  .container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-left: 12px;
    width: 100%;
    .label {
      width: 100%;
      display: flex;
      justify-content: space-between;
      position: relative;
      padding-right: 12px;
      box-sizing: border-box;
      &::after{
            content: " ";
            position: absolute;
            pointer-events: none;
            box-sizing: border-box;
            transform-origin: center;
            top: -50%;
            left: -50%;
            right: -50%;
            bottom: -50%;
            transform: scale(0.5);
            border-width: 0 0 1px 0;
            border-bottom-color: #e6e7eb;
            border-style: solid;
      }
      .evaluate {
        font-size: 14px;
        color: #212121;
        i {
          font-style: normal;
        }
      }

      .toDetail {
        font-size: 12px;
        color: #969696;
      }
      p {
        line-height: 40px;
      }
      .icon-m-right {
        color: #969696;
        width: 16px;
        height: 16px;
        line-height: 16px;
        text-align: center;
        font-size: 16px;
      }
    }
    .body {
      width: 100%;
      position: relative;
      .all-comment {
        width: 100%;
        font-family: PingFang SC;
        font-style: normal;
        font-weight: 500;
        overflow: hidden;
        .com_item {
          padding-right: 12px;
          position: relative;
          list-style: none;
        }
        .head {
            display: flex;
            font-size: 14px;
            line-height: 20px;
            justify-content: space-between;
            margin: 8px 0;
            .userinfo {
                display: flex;
                flex-wrap: nowrap;
            }
            .avart {
                width: 20px;
                height: 20px;
                -ms-flex-negative: 0;
                flex-shrink: 0;
                border-radius: 50%;
                overflow: hidden;
                img {
                    width: 100%;
                    height: 100%;
                    display: block;
                }
            }
            .name {
                flex: 1;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                padding-left: 10px;
            }
            .time {
                -ms-flex-negative: 0;
                flex-shrink: 0;
                font-size: 12px;
                display: inline-block;
                margin: 0 8px;
            }
        }
        .star {
            margin-bottom: 2.443px;
            font-size: 15px;
        }
        .content {
            font-size: 14px;
            line-height: 20px;
            padding-bottom: 8px;
            overflow: hidden;
            word-break: break-all;
        }
        .spec {
            font-size: 12px;
            line-height: 17px;
            color: #969696;
            padding-bottom: 8px;
        }
        .comment-imgs {
            padding-bottom: 8px;
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            .img-box {
                overflow: hidden;
                border-radius: 6px;
                width: 110px;
                height: 110px;
                box-sizing: border-box;
                margin-bottom: 8px;
                margin-right: 10px;
                &:nth-child(3n) {
                    margin-right: 0;
                }
                .img {
                    width: 100%;
                    height: 100%;
                }
            }
        }
      }
    }
  }
}
.align-center {
  align-items: center;
}
.flex {
  display: flex;
}
</style>
